<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:c="http://www.w3.org/1999/XSL/Transform">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
    <div th:replace="common/IncludeTop">
    </div>

    <div id="Content">
        <div id="BackLink">
            <a href="/catalog/viewAdminmain">Return to Main Menu</a>
        </div>

        <h2>Edit Users' Information </h2>
        <table class="table table-striped">
            <thead>
            <tr>
                <th>Account</th>
                <th>Edit Password</th>
                <th>Authority</th>
            </tr>

            <tr th:each="user:${userList}">
                <td th:text="${user.username}">
                    username
                </td>
                <td>
                    <a th:href="@{'/adminUser/viewEditPassword?username='+${user.username}}" th:text="${user.password}">password</a>
                </td>
                <td>
                    <div th:switch="${user.status}">
                        <a th:case="OK" th:href="@{'/adminUser/banAccount?username='+${user.username}}">Ban</a>
                        <a th:case="NO" th:href="@{'/adminUser/unbanAccount?username='+${user.username}}">UnBan</a>
                    </div>
                </td>
            </tr>


        </table>
    </div>

    <div th:replace="common/IncludeBottom">
    </div>
</body>
</html>